package com.ys.controller.web.sys;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import com.ys.service.sys.SysDictService;

@Controller
@RequestMapping("/web/sys/sysDict")
public class WebSysDictController {
	
	@Autowired
	private SysDictService sysDictService;

	/*
	 * 新增字典
	 */
	@GetMapping("/toAddSysDict")
	public String toAddSysDict(Model model, HttpServletRequest request, HttpServletResponse response){
		return sysDictService.toAddSysDict(model);
	}

	/*
	 * 编辑字典
	 */
	@GetMapping("/toEditSysDict")
	public String toEditSysDict(Model model, HttpServletRequest request, HttpServletResponse response, 
			Long id){
		return sysDictService.toEditSysDict(model, id);
	}
}
